﻿public var currentValue = 0;

function Update() {

var dieTextGameObject = GameObject.Find("DieText");

var textMeshComponent = dieTextGameObject.GetComponent("TextMesh");

textMeshComponent.text = currentValue.ToString();

}